<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="超简单！Mac打造漂亮又好用的 zsh shell 环境, 小康,xkloveme,博客">
    <meta name="description" content="身为开发者，很大一部分的时间是在用 command line 做事，如果能把 command line 调整成好用又酷炫的模样，不只是效率提升非常多，用起来爽度也比较高,上面放了一张我自己的 item，是不是觉得高大上了许多

本片文章适用">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <title>超简单！Mac打造漂亮又好用的 zsh shell 环境 | 小康之家</title>
    <link rel="icon" type="image/x-icon, image/vnd.microsoft.icon" href="/favicon.ico">

    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/5.12.1/css/all.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/materialize/1.0.0/css/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/aos/3.0.0-beta.6/aos.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/animate.css/3.5.1/animate.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/lightgallery/1.6.11/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">
    
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    
<meta name="generator" content="Hexo 4.2.0"><link rel="alternate" href="/atom.xml" title="小康之家" type="application/atom+xml">
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>


<body >
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper head-container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">小康之家</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友情链接</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>

<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">小康之家</div>
        <div class="logo-desc">
            
            小康のblog
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友情链接
		</a>
          
        </li>
        
        
        <li><div class="divider"></div></li>
        <li>
            <a href="https://github.com/xkloveme" class="waves-effect waves-light" target="_blank">
                <i class="fab fa-github-square fa-fw"></i>Fork Me
            </a>
        </li>
        
    </ul>
</div>

        </div>

        
            <style>
  .nav-transparent .github-corner {
    display: none !important;
  }

  .github-corner {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 0;
    border: 0;
    transform: scale(1.1);
  }

  .github-corner svg {
    color: #027aff;
    fill: #fff;
    height: 64px;
    width: 64px;
  }

  .github-corner:hover .octo-arm {
    animation: a 0.56s ease-in-out;
  }

  .github-corner .octo-arm {
    animation: none;
  }

  @keyframes a {
    0%,
    to {
      transform: rotate(0);
    }
    20%,
    60% {
      transform: rotate(-25deg);
    }
    40%,
    80% {
      transform: rotate(10deg);
    }
  }
</style>

<a
  href="https://github.com/xkloveme"
  class="github-corner tooltipped hide-on-med-and-down"
  target="_blank"
  data-tooltip="Fork Me"
  data-position="left"
  data-delay="50"
>
  <svg viewBox="0 0 250 250" aria-hidden="true">
    <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
    <path
      d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
      fill="currentColor"
      style="transform-origin: 130px 106px;"
      class="octo-arm"
    ></path>
    <path
      d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
      fill="currentColor"
      class="octo-body"
    ></path>
  </svg>
</a>

        
    </nav>

</header>

    



<div class="bg-cover pd-header post-cover" style="background-image: url('https://picsum.photos/600/300?t=cw7fp1yfdie')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <div class="description center-align post-title">
                        超简单！Mac打造漂亮又好用的 zsh shell 环境
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="https://cdn.bootcss.com/tocbot/4.10.0/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        margin: 35px 0 15px 0;
        padding-left: 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #toc-content .is-active-link::before {
        background-color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/%E6%8A%80%E6%9C%AF/">
                                <span class="chip bg-color">技术</span>
                            </a>
                        
                            <a href="/tags/%E5%B7%A5%E5%85%B7/">
                                <span class="chip bg-color">工具</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E6%95%99%E7%A8%8B/" class="post-category">
                                教程
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2018-05-17
                </div>
                

                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    2k
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-clock fa-fw"></i>阅读时长:&nbsp;&nbsp;
                    7 分
                </div>
                
				
                
                    <div id="busuanzi_container_page_pv" class="info-break-policy">
                        <i class="far fa-eye fa-fw"></i>阅读次数:&nbsp;&nbsp;
                        <span id="busuanzi_value_page_pv"></span>
                    </div>
				
            </div>
            
        </div>
        <hr class="clearfix">
        <div class="card-content article-card-content">
            <div id="articleContent">
                <p><img src="http://www.jixiaokang.com/wp-content/uploads/2018/05/QQ20180517-1@2x.png" alt="">身为开发者，很大一部分的时间是在用 command line 做事，如果能把 command line 调整成好用又酷炫的模样，不只是效率提升非常多，用起来爽度也比较高,上面放了一张我自己的 item，是不是觉得高大上了许多</p>
<ul>
<li>本片文章适用于 MAC 开发的 developer，学习时间大概十分钟</li>
<li>shell 默认选中 ZSH，已经安装过<strong>iTerm2，oh-my-zsh</strong></li>
<li>避免搞乱你的开发环境：仅可能使用 homebrew 来安装需要的套件</li>
<li>安装 zsh theme: <strong>powerlevel9k</strong></li>
</ul>
<h4 id="安装-iTerm2："><a href="#安装-iTerm2：" class="headerlink" title="安装 iTerm2："></a><strong>安装 iTerm2：</strong></h4><p>虽然不是必要，内建的 Terminal app 也可以，不过 iTerm2 还是比较好用，下面的示范也全都是用 iTerm2,个人用的自带其实还好</p>
<p><img src="http://www.jixiaokang.com/wp-content/uploads/2018/05/QQ20180517-3@2x.png" alt=""></p>
<p>#如果你从来没有用过 brew cask 的话需要先跑这行<br>brew tap caskroom/cask</p>
<p>#安装 iTerm2<br>brew cask instal iterm2</p>
<p>安装好以后，打开 iTerm2 检查 Report Terminal Type 的设置，路径： <code>Preferences &gt; Profiles &gt; Terminal &gt; Report Terminal Type</code></p>
<p>设为<code>xterm-256color</code>，等等在 terminal 才能看得到漂亮的颜色</p>
<p><img src="http://www.jixiaokang.com/wp-content/uploads/2018/05/QQ20180517-5@2x.png" alt=""></p>
<h4 id="修改-iTerm2-的-color-scheme"><a href="#修改-iTerm2-的-color-scheme" class="headerlink" title="修改 iTerm2 的 color scheme"></a><strong>修改 iTerm2 的 color scheme</strong></h4><p>这步骤很重要，预设的很丑，想要自己的 command line 看起来赏心悦目就绝对要换掉预设的</p>
<p><img src="http://www.jixiaokang.com/wp-content/uploads/2018/05/QQ20180517-4@2x.png" alt=""></p>
<h4 id="安装-powerline-font"><a href="#安装-powerline-font" class="headerlink" title="安装 powerline font"></a><strong>安装 powerline font</strong></h4><p>因为我们要用的 theme 会用到很多的特殊 icon，所以 iTerm2 选用的字型必需要支援这种特殊 icon font。这类型的字体统称为 powerline font（另外还有加强版支援更多特殊 icon 的叫的 nerd font）</p>
<p>没有安装的话画面会长这样，遇到 icon 会变框框问号</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*sB3u7_aAXl6BkRy9UEygPw.png" alt=""></p>
<p>非 powerline font</p>
<p>装完并设定新字型后的效果：</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*0lPAd28LbancmQuHgnDyNg.png" alt=""></p>
<p>powerline font</p>
<p>支援 powerline 的字型很多，我推荐<strong>Sauce Code Pro Nerd Font Complete</strong> 安装方式推荐直接用 brew 安装比较快又好管理</p>
<p>安装指令：</p>
<p>#先执行这行，才能用 homebrew 安装字型。曾经执行过的人可以跳过这个指令<br>brew tap caskroom/fonts</p>
<pre><code># 安裝指令
brew cask install</code></pre><p>如果想要装别的，brew 上面也有很多字型可以挑。</p>
<p>关键字是<code>nerd</code>：</p>
<p>brew cask search nerd</p>
<p>装完后，记得修改 iTerm2 字型设定否则不会生效。请改成 SauceCodePro Nerd Font 或你自己下载的字型</p>
<p>设定路径：<code>Preferences &gt; Profiles &gt; Text &gt; Change Font</code></p>
<h4 id="安装-oh-my-zsh"><a href="#安装-oh-my-zsh" class="headerlink" title="安装 oh-my-zsh"></a><strong>安装 oh-my-zsh</strong></h4><p>上一步装完 zsh 后，就可以开始调整我们想要的 command line 外观设定了，但是原始的 zsh 因为设定太难搞，所以多年前刚出现的时候没有受到太多关注，直到有人写了一套叫<strong>oh-my-zsh</strong>的 framework 来帮助大家使用 zsh，zsh 才火了起来。现在几乎所有 zsh 好用的工具都有支援 oh-my-zsh，所以当然是要装这东西</p>
<p>安装指令：</p>
<pre><code>sh -c &quot;$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)&quot;</code></pre><blockquote>
<p>注：这会直接执行 oh-my-zsh 的有疑虑的人可以先稍微研究一下<a href="https://github.com/robbyrussell/oh-my-zsh" target="_blank" rel="noopener">oh-my-zsh github</a>上的，觉得放心再执行<code>install.sh</code> <code>install.sh</code></p>
</blockquote>
<p>执行完以后如果没有出现什么错误讯息就代表成功了，同时会发现多了 oh-my-zsh 的资料夹  <code>~/.oh-my-zsh</code></p>
<h4 id="重头戏！！安装-zsh-theme-powerlevel9k-https-github-com-bhilburn-powerlevel9k"><a href="#重头戏！！安装-zsh-theme-powerlevel9k-https-github-com-bhilburn-powerlevel9k" class="headerlink" title="重头戏！！安装 zsh theme **[powerlevel9k**](https://github.com/bhilburn/powerlevel9k)"></a><strong>重头戏！！安装 zsh theme **[</strong>powerlevel9k**](<a href="https://github.com/bhilburn/powerlevel9k" target="_blank" rel="noopener">https://github.com/bhilburn/powerlevel9k</a>)</h4><p>刚装完 oh-my-zsh 以后，预设是使用内建的 theme <em>robbyrussell</em>，多了 git 资讯，颜色也看起来比原生 bash 好一些：</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*1TqBIUz998aoEAoepG4mbw.png" alt=""></p>
<p>不过 oh-my-zsh 内建很多 theme，在它的<a href="https://github.com/robbyrussell/oh-my-zsh/wiki/themes" target="_blank" rel="noopener">github wiki</a>上有很多截图可以参考</p>
<p>切换内建的 theme 很简单，直接修改你的<code>~/.zshrc</code>，把原本改成你想要的：<code>ZSH_THEME=”_robbyrussell_”</code></p>
<pre><code># 編輯 ~/.zshrc
ZSH_THEME=”</code></pre><p>任何的 zsh 设定修改过后，还要执行以下指令才会生效</p>
<p>exec $SHELL</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*Dj2trYBv3hgFg4LOIlMtWg.png" alt=""></p>
<p>agnoster 看起来是不是比 robbyrussell 漂亮多了？</p>
<p>这边推荐一个超强的 theme，powerlevel9k！</p>
<p>文章开头的图片就是撷取自<a href="https://github.com/bhilburn/powerlevel9k" target="_blank" rel="noopener">powerlevel9k 的 github</a></p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*OwwhfTqbc8IUaZnCAYXt7g.gif" alt=""></p>
<p>图片来源：<a href="https://github.com/bhilburn/powerlevel9k" target="_blank" rel="noopener">https://github.com/bhilburn/powerlevel9k</a></p>
<p>powerlevel9k 不只是像上面的示范图显示一些基本的资讯，还可以做到很屌的事情，比如像下图那样，显示 WiFi 讯号强度、笔电电池电力、CPU loading、system free memory 等等资讯在 command line</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*Ixhmm4KVixyzZolr-OTV3w.png" alt=""></p>
<p>图片撷取自<a href="https://github.com/bhilburn/powerlevel9k" target="_blank" rel="noopener">powerlevel9k github</a></p>
<h4 id="powerlevel9k-安装方式："><a href="#powerlevel9k-安装方式：" class="headerlink" title="powerlevel9k 安装方式："></a>powerlevel9k 安装方式：</h4><ol>
<li><a href="https://github.com/bhilburn/powerlevel9k" target="_blank" rel="noopener">powerlevel9k</a>不是 oh-my-zsh 内建的 theme ，必须另外下载</li>
</ol>
<p>指令：</p>
<pre><code>git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k</code></pre><p>2.编辑你的<code>~/.zshrc</code>，把 ZSH_THEME 设为 powerlevel9k，并设定要显示哪些东西在 command line 上：</p>
<pre><code>ZSH_THEME=&quot;powerlevel9k/powerlevel9k&quot;</code></pre><p># command line 左边想显示的内容<br>POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir) # &lt;= left prompt 设了”dir”</p>
<p># command line 右边想显示的内容<br>POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(time) # &lt;= right prompt 设了”time”</p>
<p>上面的例子我们把左边设了一个<code>dir</code>，右边设了<code>time</code>，代表左边想显示当前资料夹路径，右边显示时间</p>
<p>设定完后 command line 看起来会像这样(记得执行<code>exec $SHELL</code>，设定才会生效)：</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*MY6xGaUv0ksJni-EbeOZQg.png" alt=""></p>
<p>左边显示当前资料夹路径，右边显示时间</p>
<hr>
<p>如果想要有版本控制的资讯，可以在<code>POWERLEVEL9K_LEFT_PROMPT_ELEMENTS</code>加上<code>vcs</code>(vcs 为 version control system 的缩写)</p>
<pre><code># 編輯 ~/.zshrc
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs) # 加上 &quot;vcs&quot;</code></pre><p>command line 会变这样：</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*BrzqzPH-XOjywfbIekAzEQ.png" alt=""></p>
<p>多了 git branch 以及 git status 资讯</p>
<hr>
<p>当你进入了一个没有写入权限的资料夹时还可以给你提醒：</p>
<p>#加上”dir_writable”<br>POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir <strong>dir_writable</strong> vcs)</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*BYW3MIbGBv9DXzNU72JFKQ.png" alt=""></p>
<p>/etc 没有写入权限，多出一个锁头提醒你</p>
<hr>
<p>如果你的 command line 是设成 vi mode ，相信你一定碰过这个困扰，就是不晓得自己是处在 normal mode 还是 insert mode。没关系，powerlevel9k 可以帮你解决这个问题：</p>
<p>#加上”vi_mode”<br>POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs <strong>vi_mode</strong> )</p>
<p>结果如下：</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*bj90M9RvPCFZ6GNVqJUP4g.png" alt=""></p>
<p>上图告诉我们现在在 insert mode</p>
<p>按下<code>ESC</code>后：</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*PCsqH7xDf3z4lXCr81QV0A.png" alt=""></p>
<p>告诉你变 normal mode 啦~赞吧！</p>
<hr>
<p>我自己习惯左侧的设定放一些常用基本资讯 右边放一些好用但不是每次下指令都要看的东西</p>
<p>command line 右边的设定放在  <code>POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS</code></p>
<p>例如显示上一个指令的 return code：</p>
<p>#加上”status”显示上一个指令的 return code：<br>POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( <strong>status</strong> time)</p>
<p>如果指令没出错，linux return code 为 0 时会有个绿色小勾勾：</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*nSS8Df1YlCwI87ICv_jM_Q.png" alt=""></p>
<p>指令正确执行，return code 为 0</p>
<p>如果打了错误指令会出现相对应的 return code，并且用红色底色提醒你</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*DSV5vY-pzNOVcv4jaI-4Wg.png" alt=""></p>
<p>指令执行错误，return code 为 127</p>
<hr>
<p>还可以显示目前电脑的 free memory：</p>
<p>#加上 ram，显示目前的 free memory<br>POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status <strong>ram</strong> time)</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*tgWdaWPdLSn8LMharCTOYQ.png" alt=""></p>
<p>还有 4.61G 的记忆体可用</p>
<p><strong>2017/12/30 更新： 上图的最左方有个资料夹 icon，且 git 资讯多显示了几个 icon，这用原本的设定是看不到的，需要加上这行：</strong></p>
<pre><code>POWERLEVEL9K_MODE=&#39;nerdfont-complete&#39;</code></pre><p><a href="https://github.com/bhilburn/powerlevel9k/wiki/Install-Instructions#option-4-install-nerd-fonts" target="_blank" rel="noopener">powerlevel9k 的 wiki</a>有解释这个设定的作用，请大家使用时注意一下别忘记加上去</p>
<hr>
<p>加上 CPU load average：</p>
<p>#加上 load 显示 CPU 忙碌程度<br>POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status ram <strong>load</strong> time)</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*-j1gAm788RbWzRiY0MidCg.png" alt=""></p>
<p>CPU 忙碌程度 2.45，还行</p>
<p>显示电量：</p>
<p>POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( <strong>battery</strong> )</p>
<p><img src="https://cdn-images-1.medium.com/max/1600/1*48h7cUsjuzXBV8dhOjHehw.png" alt=""></p>
<p>还可以用 6 小时又 11 分</p>
<hr>
<p>示范了不少，但还有非常非常多东西可以用，请参考这个列表自己玩玩看<a href="https://github.com/bhilburn/powerlevel9k#available-prompt-segments" target="_blank" rel="noopener">https://github.com/bhilburn/powerlevel9k#available-prompt-segments</a></p>
<p>不过有些东西中看不中用，放太多东西也会让 command line 反应变慢，试了各种设定一阵子后，只留下了一些我觉得比较有用的，给大家参考：</p>
<p>#左侧<br>POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir dir_writable vcs vi_mode)</p>
<p>#右侧<br>POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status background_jobs history ram load time)</p>
<p>#若当前登入的帐号为你的帐号 xxx，就不用特别显示出来<br>DEFAULT_USER=”xxx”</p>
<pre><code># 使用 nerd font 時可以顯示更多 icon。詳情請參考</code></pre><hr>
<h4 id="最后…"><a href="#最后…" class="headerlink" title="最后…"></a>最后…</h4><p>这篇文章介绍了怎么样把自己的 command line 替换成 zsh，并且使用很厉害的 powerlevel9k theme，不过 zsh 不只是可以换酷炫的 theme 而已，更重要的是还有很多比 bash 好用的功能可以大幅提升工作效率，又可以装各种方便的 plugin，就留待有机会时再介绍啰</p>
<hr>

            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="http://jixioakang.com" rel="external nofollow noreferrer">xkloveme</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="http://jixioakang.com/2018/05/17/2018-05-17-chao-jian-dan-mac-da-zao-piao-liang-you-hao-yong-de-zsh-shell-huan-jing/">http://jixioakang.com/2018/05/17/2018-05-17-chao-jian-dan-mac-da-zao-piao-liang-you-hao-yong-de-zsh-shell-huan-jing/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="http://jixioakang.com" target="_blank">xkloveme</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/%E6%8A%80%E6%9C%AF/">
                                    <span class="chip bg-color">技术</span>
                                </a>
                            
                                <a href="/tags/%E5%B7%A5%E5%85%B7/">
                                    <span class="chip bg-color">工具</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">

<div id="article-share">
    
    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
  #reward {
    margin: 40px 0;
    text-align: center;
  }

  #reward .reward-link {
    font-size: 1.4rem;
    line-height: 38px;
  }

  #reward .btn-floating:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  #rewardModal {
    width: 320px;
  }

  #rewardModal .reward-title {
    margin: 15px auto;
    padding-bottom: 5px;
  }

  #rewardModal .modal-content {
    padding: 10px;
  }

  #rewardModal .close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.3rem;
    line-height: 20px;
    cursor: pointer;
  }

  #rewardModal .close:hover {
    color: #ef5350;
    transform: scale(1.3);
    -moz-transform: scale(1.3);
    -webkit-transform: scale(1.3);
    -o-transform: scale(1.3);
  }

  #rewardModal .reward-tabs {
    margin: 0 auto;
    width: 210px;
  }

  .reward-tabs .tabs {
    height: 38px;
    margin: 10px auto;
    padding-left: 0;
  }

  .reward-content ul {
    padding-left: 0 !important;
  }

  .reward-tabs .tabs .tab {
    height: 38px;
    line-height: 38px;
  }

  .reward-tabs .tab a {
    color: #fff;
    background-color: #ccc;
  }

  .reward-tabs .tab a:hover {
    background-color: #ccc;
    color: #fff;
  }

  .reward-tabs .wechat-tab .active {
    color: #fff !important;
    background-color: #22ab38 !important;
  }

  .reward-tabs .alipay-tab .active {
    color: #fff !important;
    background-color: #019fe8 !important;
  }

  .reward-tabs .reward-img {
    width: 210px;
  }
</style>

<div id="reward">
  <a
    href="#rewardModal"
    class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red"
    >赏</a
  >

  <!-- Modal Structure -->
  <div id="rewardModal" class="modal">
    <div class="modal-content">
      <a class="close modal-close"><i class="fas fa-times"></i></a>
      <h4 class="reward-title">你的赏识是我前进的动力</h4>
      <div class="reward-content">
        <div class="reward-tabs">
          <ul class="tabs row">
            <li class="tab col s6 alipay-tab waves-effect waves-light">
              <a href="#alipay">支付宝</a>
            </li>
            <li class="tab col s6 wechat-tab waves-effect waves-light">
              <a href="#wechat">微 信</a>
            </li>
          </ul>
          <div id="alipay">
            <img
              src="/medias/reward/alipay.jpg"
              class="reward-img"
              alt="支付宝打赏二维码"
            />
          </div>
          <div id="wechat">
            <img
              src="/medias/reward/wechat.png"
              class="reward-img"
              alt="微信打赏二维码"
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  $(function() {
    $(".tabs").tabs();
  });
</script>

            
        </div>
    </div>

    
        <link rel="stylesheet" href="https://cdn.bootcss.com/gitalk/1.6.2/gitalk.min.css">
<link rel="stylesheet" href="/css/my-gitalk.css">

<div class="card gitalk-card" data-aos="fade-up">
    <div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; left: 20px; top: 15px; padding-bottom: 5px;">
        <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
        <span>评论</span>
    </div>
    <div id="gitalk-container" class="card-content"></div>
</div>

<script src="https://cdn.bootcss.com/gitalk/1.6.2/gitalk.min.js"></script>
<script>
    let gitalk = new Gitalk({
        clientID: 'f1e60c7afa53a51926b5',
        clientSecret: '2430231be04e68f6ba8ccf331c537cc19f50a0bd',
        repo: 'xkloveme.github.io',
        owner: 'xkloveme',
        admin: "xkloveme",
        id: '2018-05-17T00-16-48',
        distractionFreeMode: false  // Facebook-like distraction free mode
    });

    gitalk.render('gitalk-container');
</script>
    

    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/2018/05/27/2018-05-27-js-ji-chong-shu-zu-bian-li-fang-shi-xiang-jie/">
                    <div class="card-image">
                        
                        
                        <img src="https://picsum.photos/600/300" class="responsive-img" alt="JS几种数组遍历方式详解">
                        
                        <span class="card-title">JS几种数组遍历方式详解</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            前言在前端开发中循环是必不可少的，在很多情况下不知道该用哪种循环类型，真是让人头大 😵🐷，因此知道每种循环 ♻️ 的运行效率是武装我们自己最有效的方式。一、循环的类型在前端循环中，有大概八种：第一种:普通 for 循环
for(j = 
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2018-05-27
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E5%89%8D%E7%AB%AF/" class="post-category">
                                    前端
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/ES6/">
                        <span class="chip bg-color">ES6</span>
                    </a>
                    
                    <a href="/tags/JavaScript/">
                        <span class="chip bg-color">JavaScript</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2018/05/16/2018-05-17-vue-fen-xiang-zhi-shi-dian/">
                    <div class="card-image">
                        
                        
                        <img src="https://picsum.photos/600/300" class="responsive-img" alt="vue 分享知识点">
                        
                        <span class="card-title">vue 分享知识点</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            vue 分享模块清单1.Vue 2.0 之 Vue 实例和生命周期2.vue 2.0 之自定义指令3.vue 2.0 之观察者模式实现简单异步无限滚动 4.从 JavaScript 属性描述器剖析 Vue.js 响应式视图5.Vue 响应式
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2018-05-16
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E5%89%8D%E7%AB%AF/" class="post-category">
                                    前端
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/%E6%8A%80%E6%9C%AF/">
                        <span class="chip bg-color">技术</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>


<script>
    $('#articleContent').on('copy', function (e) {
        // IE8 or earlier browser is 'undefined'
        if (typeof window.getSelection === 'undefined') return;

        var selection = window.getSelection();
        // if the selection is short let's not annoy our users.
        if (('' + selection).length < Number.parseInt('120')) {
            return;
        }

        // create a div outside of the visible area and fill it with the selected text.
        var bodyElement = document.getElementsByTagName('body')[0];
        var newdiv = document.createElement('div');
        newdiv.style.position = 'absolute';
        newdiv.style.left = '-99999px';
        bodyElement.appendChild(newdiv);
        newdiv.appendChild(selection.getRangeAt(0).cloneContents());

        // we need a <pre> tag workaround.
        // otherwise the text inside "pre" loses all the line breaks!
        if (selection.getRangeAt(0).commonAncestorContainer.nodeName === 'PRE') {
            newdiv.innerHTML = "<pre>" + newdiv.innerHTML + "</pre>";
        }

        var url = document.location.href;
        newdiv.innerHTML += '<br />'
            + '来源: 小康之家<br />'
            + '文章作者: xkloveme<br />'
            + '文章链接: <a href="' + url + '">' + url + '</a><br />'
            + '本文章著作权归作者所有，任何形式的转载都请注明出处。';

        selection.selectAllChildren(newdiv);
        window.setTimeout(function () {bodyElement.removeChild(newdiv);}, 200);
    });
</script>


<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>

    
<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


<!-- 代码块折行 -->

<style type="text/css">
code[class*="language-"], pre[class*="language-"] { white-space: pre !important; }
</style>

    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="https://cdn.bootcss.com/tocbot/4.10.0/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            // headingsOffset: -205,
            headingSelector: 'h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>



    <footer class="page-footer bg-color">
  <div class="container row center-align">
    <div class="col s12 m8 l8 copy-right">
      Copyright&nbsp;&copy;
      <span id="year">年份</span>
      <a href="http://jixioakang.com" target="_blank">xkloveme</a>
      |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
      <br />
       &nbsp;<i
        class="fas fa-chart-area"
      ></i
      >&nbsp;站点总字数:&nbsp;<span class="white-color"
        >141.5k</span
      >&nbsp;字      
      <span id="busuanzi_container_site_pv">
        |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span
          id="busuanzi_value_site_pv"
          class="white-color"
        ></span
        >&nbsp;次
      </span>
       
      <span id="busuanzi_container_site_uv">
        |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span
          id="busuanzi_value_site_uv"
          class="white-color"
        ></span
        >&nbsp;人
      </span>
      
      <br />
      
      <span id="sitetime">载入运行时间...</span>
      <script>
        function siteTime() {
          window.setTimeout("siteTime()", 1000);
          var seconds = 1000;
          var minutes = seconds * 60;
          var hours = minutes * 60;
          var days = hours * 24;
          var years = days * 365;
          var today = new Date();
          var startYear = "2017";
          var startMonth = "3";
          var startDate = "13";
          var startHour = "0";
          var startMinute = "0";
          var startSecond = "0";
          var todayYear = today.getFullYear();
          var todayMonth = today.getMonth() + 1;
          var todayDate = today.getDate();
          var todayHour = today.getHours();
          var todayMinute = today.getMinutes();
          var todaySecond = today.getSeconds();
          var t1 = Date.UTC(
            startYear,
            startMonth,
            startDate,
            startHour,
            startMinute,
            startSecond
          );
          var t2 = Date.UTC(
            todayYear,
            todayMonth,
            todayDate,
            todayHour,
            todayMinute,
            todaySecond
          );
          var diff = t2 - t1;
          var diffYears = Math.floor(diff / years);
          var diffDays = Math.floor(diff / days - diffYears * 365);
          var diffHours = Math.floor(
            (diff - (diffYears * 365 + diffDays) * days) / hours
          );
          var diffMinutes = Math.floor(
            (diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
              minutes
          );
          var diffSeconds = Math.floor(
            (diff -
              (diffYears * 365 + diffDays) * days -
              diffHours * hours -
              diffMinutes * minutes) /
              seconds
          );
          if (startYear == todayYear) {
            document.getElementById("year").innerHTML = todayYear;
            document.getElementById("sitetime").innerHTML =
              "本站已安全运行 " +
              diffDays +
              " 天 " +
              diffHours +
              " 小时 " +
              diffMinutes +
              " 分钟 " +
              diffSeconds +
              " 秒";
          } else {
            document.getElementById("year").innerHTML =
              startYear + " - " + todayYear;
            document.getElementById("sitetime").innerHTML =
              "本站已安全运行 " +
              diffYears +
              " 年 " +
              diffDays +
              " 天 " +
              diffHours +
              " 小时 " +
              diffMinutes +
              " 分钟 " +
              diffSeconds +
              " 秒";
          }
        }
        setInterval(siteTime, 1000);
      </script>
      
      <br />
      
    </div>
    <div class="col s12 m4 l4 social-link social-statis">
      
    <a href="https://github.com/xkloveme" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:xkloveme@gmail.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>





    <a href="https://twitter.com/xkloveme" class="tooltipped" target="_blank" data-tooltip="关注我的Twitter: https://twitter.com/xkloveme" data-position="top" data-delay="50">
        <i class="fab fa-twitter"></i>
    </a>









    <a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
        <i class="fas fa-rss"></i>
    </a>


    </div>
  </div>
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script src="/js/search.js"></script>
<script type="text/javascript">
$(function () {
    searchFunc("/" + "search.xml", 'searchInput', 'searchResult');
});
</script>
    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="https://cdn.bootcss.com/materialize/1.0.0/js/materialize.min.js"></script>
    <script src="https://cdn.bootcss.com/masonry/4.0.0/masonry.pkgd.min.js"></script>
    <script src="https://cdn.bootcss.com/aos/3.0.0-beta.6/aos.js"></script>
    <script src="https://cdn.bootcss.com/scrollprogress/3.0.2/scrollProgress.min.js"></script>
    <script src="https://cdn.bootcss.com/lightgallery/1.6.11/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    <!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102352377-2"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'UA-102352377-2');
</script>


    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <script src="/libs/others/clicklove.js" async="async"></script>
    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    

    

    

    
    <script type="text/javascript" src="/libs/background/ribbon-dynamic.js" async="async"></script>
    
    
    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    

</body>

</html>
